package com.authority.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.authority.entry.AuthRoleDO;
import com.authority.query.AuthRoleQuery;

public interface AuthRoleDAO {

	List<AuthRoleDO> queryAuthRole(AuthRoleQuery query);
	
	AuthRoleDO queryAuthRoleById(Long id);
	
	Long insertAuthRole(AuthRoleDO db);

	int deleteAuthRoleByIds(String ids);

	int updateAuthRole(AuthRoleDO db);

	int queryAuthRoleCount(AuthRoleQuery query);
	
	/**
	 * 根据id查name
	 * @param id
	 * @return
	 */
	String queryNameById(Long id);
	
	/**
	 * 根据code和syId查
	 * @param code
	 * @param sysId
	 * @return
	 */
	Long queryAuthRoleByCodeAndSysId(@Param("code")String code,@Param("sysId")Long sysId);
	
	/**
	 * 根据type查
	 * @param type
	 * @return
	 */
	List<AuthRoleDO> queryAuthRoleByType(Long type);
	
	/**
	 * 根据sysId查
	 * @param sysId
	 * @return
	 */
	List<AuthRoleDO>  queryAuthRoleBySysId(Long sysId);

	List<AuthRoleDO> queryAuthRoleByUserId(Map<String,Object> map);
}
